﻿using RsCms.Entities;
using RsCode;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RsCms.Core
{
    [ScopedService]
    public interface IPostDomainService
    {
        Task<Entities.Posts> GetPostsAsync(string id);
        Task<PageData<Entities.Posts>> PagePublishAsync(int page, int pageSize, string[] date = null);

        Task<Entities.Posts> GetPostsBySlugAsync(string slug);
        Task<Entities.Posts> SaveAsync(Entities.Posts posts);
        Task<PostsMeta> SaveAsync(PostsMeta postsMeta);
        Task<PageData<Entities.Posts>> PageDraftsAsync(int page, int pageSize, string[] date = null);

        Task<PageData<Entities.Posts>> PageScheduledAsync(int page, int pageSize, string[] date = null);

        Task<PageData<Entities.Posts>> PageAsync(int page, int pageSize);

        Task<PageData<Entities.Posts>> PageAsync(int page, int pageSize, string tag);
    }
}
